package com.cq.cqmall.product.vo;

import com.cq.cqmall.product.entity.SkuImagesEntity;
import com.cq.cqmall.product.entity.SkuInfoEntity;
import com.cq.cqmall.product.entity.SpuInfoDescEntity;
import lombok.Data;
import lombok.ToString;

import java.util.List;

/**
 * 项目签证官
 *
 * @author 程崎
 * @since 2022/10/25
 */
@Data
@ToString
public class SkuItemVO {
    /**
     * sku基本信息
     */
    private SkuInfoEntity info;

    /**
     * sku的图片信息
     */
    private List<SkuImagesEntity> images;

    /**
     * spu的销售属性组合
     */
    private List<SkuItemSaleAttrsVO> saleAttr;
    /**
     * spu介绍
     */
    private SpuInfoDescEntity desp;

    private List<SpuItemAttrGroupVO> groupAttrs;


    /**
     * 秒杀商品的优惠信息
     */
    private SeckillSkuVo seckillSkuVo;


    /**
     * 销售属性VO
     *
     * @author 程崎
     * @since 2022/10/25
     */
    @Data
    @ToString
    public static class SkuItemSaleAttrsVO {

        /**
         * 属性id
         */
        private Long attrId;
        /**
         * 属性名
         */
        private String attrName;

        private String attrValues;

    }

    @Data
    @ToString
    public static class SpuItemAttrGroupVO {
        private String groupName;
        private List<SpuBaseAttrVO> attrs;
    }

    @Data
    @ToString
    public static class SpuBaseAttrVO {

        private String attrName;

        private String attrValue;
    }
}
